#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<assert.h>
int my_strlen(const char* dest)
{
	const char* a = dest;
	while (*dest)
	{
		dest++;
	}
	
	return dest - a;
}
int my_strcmp(const char* a, const char* b)
{
	assert(*a && *b);
	while (*a == *b)
	{
		if (*a)
			return 0;
		a++;
		b++;
	}
	return *a - *b;
}
const char* my_strcpy( char* dest, const char* src)
{
	const char* ret = dest;
	assert(dest && src);
	while ((*dest++ = *src++)!=NULL)
	{
		;
	}
	return ret;
}
const char* my_strcat(char* dest, const char* src)
{
	const char* ret = dest;
	while (*dest != '\0')
	{
		dest++;
	}
	while (*dest++ = *src++);
	return ret;
}
//int main()
//{
//	char a[20] = "abcda";
//	 char b[] = "da";
//	 printf("%d", my_strlen(a));
//	 /*printf("%s", my_strcpy(a, b));*/
//	/*printf("%s", my_strcat(a, b));*/
//}